//
//  JSONParser.m
//  UI19_网络数据解析
//
//  Created by 李劲成 on 16/4/5.
//  Copyright © 2016年 ljc. All rights reserved.
//

#import "JSONParser.h"

@implementation JSONParser


+ (id)jsonParserWithFileName:(NSString *)name fileType:(NSString *)type {
    
    NSString *path = [[NSBundle mainBundle]pathForResource:name ofType:type];
    NSData *data = [NSData dataWithContentsOfFile:path];
    NSError *error = nil;
    id result = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
    return result;
}

@end
